package IO流.打印流;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Date;

public class 字符打印流 {
    public static void main(String[] args) throws IOException {
        //1.创建字符打印流的对象
        PrintWriter pw=new PrintWriter(new FileWriter("F\\d.txt"),true);

        //2.写出数据
        pw.println("你好啊世界!");
        pw.print("fjals");
        pw.printf("%s喜欢","小明");
        pw.print(true);

        //3.释放资源
        pw.close();
        long l = System.currentTimeMillis();
        Date date=new Date(l);
        System.out.println(date);
    }
}
